import request from '@/utils/request'
// 根据角色id获取对应的菜单
export function reqrolePermissionList(roleId) {
    return request.get(`/admin/acl/permission/toAssign/${roleId}`)
}
// 获取菜单
export function reqPermissionList() {
    return request.get(`/admin/acl/permission`)
}
// 给角色分配权限
export function roledoAssign(roleId, permissionId) {
    return request.post(`/admin/acl/permission/doAssign`, {}, {
        params: {
            roleId,
            permissionId,
        }
    })
}
// 新增菜单
export function addItemPower(powerInfo) {
    return request.post(`/admin/acl/permission/save`, powerInfo)
}
//修改菜单
export function updatePower(powerInfo) {
    return request.put(`/admin/acl/permission/update`, powerInfo)
}
// 删除菜单
export function delPowerItem(id) {
    return request.delete(`/admin/acl/permission/remove/${id}`)
}